package ssq.gamest.game.ai;

import ssq.gamest.game.Poker;
import ssq.gamest.game.PokerPattern;

/**
 * AI的设置类
 *
 * @author s
 */
public class PokerAiSettings
{
    /**
     * 一手牌的权重表达式, 默认是总权重除以手数.
     */
    public Poker game;

    public PokerAiSettings(Poker game)
    {
        this.game = game;
    }

    /**
     * @param p
     *            已经匹配过的p
     * @return 权重
     */
    public double getWeight(PokerPattern p)
    {
        return game.settings.importance.get(p.getClass()) * p.sumOfCards;
    }
}
